package com.blog.services.impl;

import com.blog.dao.IUserDao;
import com.blog.pojo.User;
import com.blog.services.IUserService;
import com.blog.utils.MD5;

public class UserServiceImpl implements IUserService {

	private IUserDao userDao;

	public void setUserDao(IUserDao userDao) {
		this.userDao = userDao;
	}

	@Override
	public boolean login(User user) {
		user.setUserPwd(MD5.encrypt(user.getUserPwd()));// 密码加密
		return this.userDao.login(user);
	}

}
